<demo>Demo 2</demo>
<template>
  <div>
    <Button @click="showDialog">Show Dialog</Button>
  </div>
</template>
<script lang="ts">
import { openDialog } from '../lib/openDialog'
import Button from '../lib/Button.vue'

export default {
  components: {
    Button,
  },
  setup() {
    const showDialog = () => {
      openDialog({
        title: 'Function call',
        content: 'Dialog opened by function call',
        ok: () => {
          console.log('ok')
        },
        cancel: () => {
          console.log('cancel')
        }
      })
    }
    return {
      showDialog,
    }
  }
}
</script>